<?php
session_start();
?>

<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>个人首页</title>
    <link rel="stylesheet" href="CSS/index.css">
</head>

<body>
    <?php if (isset($_SESSION['is_login']) && $_SESSION['is_login']) : ?>
        <div class="content">
            <h1>
                欢迎用户
                <?php
                echo  $_SESSION['username'];
                ?>
                来到你的个人中心
            </h1>
            <a href="loginout.php">重新登录</a>
        </div>
    <?php else : ?>
        <?php header("Location: login.php"); ?>
    <?php endif; ?>

</body>

</html>